{extend name="layout"}

{block name="content"}
	<form {if empty($data)} action="{:url('admin/ActivityCategory/save')}" {else /} action="{:url('admin/ActivityCategory/update', ['id' => $data->id])}"  {/if} method="post" enctype="multipart/form-data">
		<div class="form-group col-7">
			<label for="">分类名称</label>
			<input type="text" class="form-control" name="name" value="{$data->name?? ''}">
		</div>
		<div class="form-group col-7">
			<label for="">排序</label>
			<input type="text" class="form-control" name="sorder" value="{$data->sorder?? 0}">
		</div>
		<div class="form-group col-7">
			<label for="">分类图标</label>
			<input type="file" name="picture" class="form-control"> 
		</div>
		{if isset($data)} <input type="hidden" name="_method" value="PUT"> {/if}
		<div class="form-group col-7">
			<label for=""></label>
			<button class="btn btn-primary" type="submit">提交</button>
		</div>
	</form>
{/block}